// 复习C结构， 计算弹跳的网球的函数

#include <iostream>
#include <string.h>
using namespace std;

enum TBallAge {
    TBallAge_new,
    TBallAge_so_so,
    TBallAge_flat,
    TBallAge_dead
};

struct TennisBall {
    double radius;
    double weight;
    double spin_rate;
    TBallAge age;
};

enum Surface {
    Surface_concrete,
    Surface_clay,
    Surface_grass,
};

double CalcBounceHeight(TennisBall* ball, double height, Surface type);

void CalcNewSpinRate(TennisBall* ball, Surface type);

void CalcAge(TennisBall* ball, int playedHours);

int main() {
    TennisBall ball;

    int playedHours = 5;
    CalcAge(&ball, playedHours);

    ball.spin_rate = 0.0f;
    ball.radius = 1.5f;
    ball.weight = 0.25f;

    double height = CalcBounceHeight(&ball, 6.0f, Surface_concrete);
    CalcNewSpinRate(&ball, Surface_concrete);
}

double CalcBounceHeight(TennisBall* ball, double height, Surface type) {
    // ....
    return 0;
}

void CalcNewSpinRate(TennisBall* ball, Surface type) {
    // ...
}

void CalcAge(TennisBall* ball, int playedHours) {
    // ...
}